From d80f57405bbf5db8781b15dfc087889ff41949a5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 9 Jul 2017 16:27:08 +0300 Subject: [PATCH] Fix more tests --- tests/bench.rs | 10 +++++----- tests/cross-compile.rs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/bench.rs b/tests/bench.rs index b9adbf466..ec2374a0f 100644 --- a/tests/bench.rs +++ b/tests/bench.rs @@ -16,7 +16,7 @@ fn cargo_bench_simple() { let p = project("foo") .file("Cargo.toml", &basic_bin_manifest("foo")) - .file("src/foo.rs", r#" + .file("src/main.rs", r#" #![feature(test)] extern crate test; @@ -153,7 +153,7 @@ fn cargo_bench_verbose() { let p = project("foo") .file("Cargo.toml", &basic_bin_manifest("foo")) - .file("src/foo.rs", r#" + .file("src/main.rs", r#" #![feature(test)] extern crate test; fn main() {} @@ -163,7 +163,7 @@ fn cargo_bench_verbose() { assert_that(p.cargo_process("bench").arg("-v").arg("hello"), execs().with_stderr(&format!("\ [COMPILING] foo v0.5.0 ({url}) -[RUNNING] `rustc [..] src[/]foo.rs [..]` +[RUNNING] `rustc [..] src[/]main.rs [..]` [FINISHED] release [optimized] target(s) in [..] [RUNNING] `[..]target[/]release[/]deps[/]foo-[..][EXE] hello --bench`", url = p.url())) .with_stdout_contains("test bench_hello ... bench: [..]")); @@ -213,7 +213,7 @@ fn cargo_bench_failing_test() { let p = project("foo") .file("Cargo.toml", &basic_bin_manifest("foo")) - .file("src/foo.rs", r#" + .file("src/main.rs", r#" #![feature(test)] extern crate test; fn hello() -> &'static str { @@ -245,7 +245,7 @@ thread '[..]' panicked at 'assertion failed: \ `(left == right)`[..]", p.url())) .with_stderr_contains("[..]left: `\"hello\"`[..]") .with_stderr_contains("[..]right: `\"nope\"`[..]") - .with_stderr_contains("[..]src[/]foo.rs:14[..]") + .with_stderr_contains("[..]src[/]main.rs:14[..]") .with_status(101)); } diff --git a/tests/cross-compile.rs b/tests/cross-compile.rs index 3054185b6..55ba530a7 100644 --- a/tests/cross-compile.rs +++ b/tests/cross-compile.rs @@ -528,7 +528,7 @@ fn cross_tests() { [[bin]] name = "bar" "#) - .file("src/main.rs", &format!(r#" + .file("src/bin/bar.rs", &format!(r#" extern crate foo; use std::env; fn main() {{ -- 2.30.2